package sorts

func bubbleSort(arr []int) []int {
	swaped := true
	for swaped {
		for i := len(arr); i >= 0; i-- {
			swaped = false
			for j := 0; j < i; j++ {
				if arr[j] > arr[j+1] {
					arr[j], arr[j+1] = arr[j+1], arr[j]
					swaped = true
				}
			}
		}
	}

	return arr
}

